package cn.edu.ahu.aircondition.modbus.service.entity;


import cn.edu.ahu.aircondition.modbus.service.domain.QueryRegDomain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 状态表实体
 * Created by ahu on 2017/6/6.
 */
@Entity
@Table(name = "Status_Tabel")
public class AirConStatusEntity {
    private Integer deviceAddress;
    private String aTemp;
    private String aoc;
    private String dwind;
    private String fModel;
    private String hElec;
    private String errMsg;
    private String UpdateTime;
    private String aocTime;
    private String eTemp;

//    public AirConStatusEntity(QueryRegDomain queryRegDomain) {
//        SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
//        this.hElec = "无效";
//        this.deviceAddress = queryRegDomain.getDeviceAddress();
//        this.aTemp = queryRegDomain.getAirConCtrlTemp();
//        this.aoc = queryRegDomain.getAoc();
//        this.dwind = queryRegDomain.getWind();
//        this.fModel = queryRegDomain.getModel();
//        this.errMsg = queryRegDomain.getErrMsg();
//        this.eTemp = queryRegDomain.getEnvTemp();
//        this.deviceAddress = queryRegDomain.getDeviceAddress();
//        this.UpdateTime = String.valueOf(df.format(new Date()));
//    }

//    public AirConStatusEntity() {
//    }

    @Id
    @Column(name = "DeviceAddress",nullable = false)
    public Integer getDeviceAddress() {

        return deviceAddress;
    }

    @Column(name = "ATemp")
    public String getaTemp() {
        return aTemp;
    }

    @Column(name = "Aoc")
    public String getAoc() {
        return aoc;
    }

    @Column(name = "Dwind")
    public String getDwind() {
        return dwind;
    }

    @Column(name = "FModel")
    public String getfModel() {
        return fModel;
    }

    @Column(name = "HElec")
    public String gethElec() {
        return hElec;
    }

    @Column(name = "ErrorMessage")
    public String getErrMsg() {
        return errMsg;
    }

    @Column(name = "Updatetime")
    public String getUpdateTime() {
        return UpdateTime;
    }

    @Column(name = "Aoctime")
    public String getAocTime() {
        return aocTime;
    }

    @Column(name = "eTemp")
    public String geteTemp() {
        return eTemp;
    }

    public void setDeviceAddress(Integer deviceAddress) {
        this.deviceAddress = deviceAddress;
    }

    public void setaTemp(String aTemp) {
        this.aTemp = aTemp;
    }

    public void setAoc(String aoc) {
        this.aoc = aoc;
    }

    public void setDwind(String dwind) {
        this.dwind = dwind;
    }

    public void setfModel(String fModel) {
        this.fModel = fModel;
    }

    public void sethElec(String hElec) {
        this.hElec = hElec;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public void setUpdateTime(String updateTime) {
        UpdateTime = updateTime;
    }

    public void setAocTime(String aocTime) {
        this.aocTime = aocTime;
    }

    public void seteTemp(String eTemp) {
        this.eTemp = eTemp;
    }
}
